package com.overto.gwt.hermes.client;

import com.google.gwt.user.client.rpc.ServiceDefTarget;

/**
 * JSON service settings.
 */
public interface JSONServiceDefTarget extends ServiceDefTarget {
	/**
	 * Gets HTTP user name
	 */
	public String getUser();
	/**
	 * Sets HTTP user name
	 */
	public void setUser(String user);
	
	/**
	 * Gets HTTP password
	 */
	public String getPassword();
	/**
	 * Sets HTTP password
	 */
	public void setPassword(String password);
	
	/**
	 * Gets flag determining if the method name will be appended
	 * to the URL passed in serviceEntryPoint, i.e. if this flag is true,
	 * serviceEntryPoint equals "www.foo.com" and we are calling the method
	 * "doBar", the resulting address will be "www.foo.com/doBar". Otherwise
	 * we'll just always call "www.foo.com"
	 */
	public boolean getAppendMethodNameToAddress();
	/**
	 * Sets flag determining if the method name will be appended
	 * to the URL passed in serviceEntryPoint, i.e. if this flag is true,
	 * serviceEntryPoint equals "www.foo.com" and we are calling the method
	 * "doBar", the resulting address will be "www.foo.com/doBar". Otherwise
	 * we'll just always call "www.foo.com"
	 */
	public void setAppendMethodNameToAddress(boolean appendMethodNameToAddress);
}
